<template>
      <div>
          <div v-for="(item,index) in list" :key="index">
              <span>{{item.title}}</span>
              <List :list="item.children"></List>
          </div>
      </div>
</template>

<script>
export default {
    name:"List",//name的名字就是递归组件的名字，标签名必须和name名保持一致
    props:["list"],
    mounted(){
    //    console.log(this.$parent) 
    }

}
</script>

<style>

</style>